(defun c:setannoscale ( / )
  (vl-load-com)
  (setq it(entsel))
  (setq ename1 (car it))
  (IF (EQ (CDR (ASSOC 0 (ENTGET ename1))) "INSERT")
    (SETQ all-this-ins (SSGET "X" (LIST (ASSOC 2 (ENTGET ename1)))))
  )
  (IF ukword NIL (LOAD "ukword" "\nFile UKWORD.LSP not loaded! "))
  (SETQ do-all-this (ukword 1 "Yes No" (STRCAT "Set Annoscale for all \"" (CDR (ASSOC 2 (ENTGET ename1))) "\" blocks? [Yes/No]") (IF do-all-this do-all-this "No")))
  (IF (EQ do-all-this "Yes")
    NIL
    (SETQ all-this-ins (SSGET "X" (LIST (ASSOC 2 (ENTGET ename1))(ASSOC 10 (ENTGET ename1)))))
  )
  (SETQ cnt 0)
  (WHILE (AND all-this-ins (< cnt (SSLENGTH all-this-ins)))
  (SETQ ename (SSNAME all-this-ins cnt))
  (setq anobj (vlax-ename->vla-object ename)) ; for inspecting a selection
  (setq newscalefactor (/ 1.0 (getvar "CANNOSCALEVALUE")))
  (PRINC "\nCurrent annotation scale is: ")
  (PRINC (getvar "CANNOSCALE"))
  (PRINC)
  (IF (AND (= (VLAX-GET-PROPERTY anobj 'XScaleFactor)(VLAX-GET-PROPERTY anobj 'XEffectiveScaleFactor))
           (= (VLAX-GET-PROPERTY anobj 'YScaleFactor)(VLAX-GET-PROPERTY anobj 'YEffectiveScaleFactor))
           (= (VLAX-GET-PROPERTY anobj 'ZScaleFactor)(VLAX-GET-PROPERTY anobj 'ZEffectiveScaleFactor))
      )
    NIL
    (PROGN
      (VLAX-PUT-PROPERTY anobj 'XScaleFactor newscalefactor)
      (VLAX-PUT-PROPERTY anobj 'XEffectiveScaleFactor 1.0)
      (VLAX-PUT-PROPERTY anobj 'YScaleFactor newscalefactor)
      (VLAX-PUT-PROPERTY anobj 'YEffectiveScaleFactor 1.0)
      (VLAX-PUT-PROPERTY anobj 'ZScaleFactor newscalefactor)
      (VLAX-PUT-PROPERTY anobj 'ZEffectiveScaleFactor 1.0)
    )
  )
  (SETQ cnt (1+ cnt))
  )
  (PRINC)
)
(defun c:setcannoscale ( / )
  (vl-load-com)
  (setq it(entsel))
  (setq ename (car it))
  (setq anobj (vlax-ename->vla-object ename)) ; for inspecting a selection
  (setq newscalefactor (/ 1.0 (getvar "CANNOSCALEVALUE")))
  (PRINC "\nCurrent annotation scale is: ")
  (PRINC (getvar "CANNOSCALE"))
  (PRINC)
  (IF (AND (= (VLAX-GET-PROPERTY anobj 'XScaleFactor)(VLAX-GET-PROPERTY anobj 'XEffectiveScaleFactor))
           (= (VLAX-GET-PROPERTY anobj 'YScaleFactor)(VLAX-GET-PROPERTY anobj 'YEffectiveScaleFactor))
           (= (VLAX-GET-PROPERTY anobj 'ZScaleFactor)(VLAX-GET-PROPERTY anobj 'ZEffectiveScaleFactor))
      )
    NIL
    (PROGN
      (VLAX-PUT-PROPERTY anobj 'XScaleFactor newscalefactor)
      (VLAX-PUT-PROPERTY anobj 'XEffectiveScaleFactor 1.0)
      (VLAX-PUT-PROPERTY anobj 'YScaleFactor newscalefactor)
      (VLAX-PUT-PROPERTY anobj 'YEffectiveScaleFactor 1.0)
      (VLAX-PUT-PROPERTY anobj 'ZScaleFactor newscalefactor)
      (VLAX-PUT-PROPERTY anobj 'ZEffectiveScaleFactor 1.0)
    )
  )
  (PRINC)
)